package Bank;

/**
 * @Author admin
 * @Date 2019/3/19 13:48
 *
 * 父类：
 * 属性：
 * 方法： set/get、构造方法、特殊方法
 */
public class Bank {
    int money;
    int year;
    double interest;
    double rate;


    Bank(){

    }
    public Bank(int money,  double rate) {
        this.money = money;
        this.rate = rate;
    }
    /**
     * 计算利息并返回
     * */
   public double computerInterest(){
        return year*money*rate;
   }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public void setInterest(double interest) {
        this.interest = interest;
    }

    public double getInterest() {
        return interest;
    }

}
